load("@rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "cmds",
    srcs = ["cmds.go"],
    importpath = "github.com/pachyderm/pachyderm/v2/src/server/pps/cmds",
    visibility = ["//visibility:public"],
    deps = [
        "//src/constants",
        "//src/internal/client",
        "//src/internal/cmdutil",
        "//src/internal/config",
        "//src/internal/errors",
        "//src/internal/errutil",
        "//src/internal/grpcutil",
        "//src/internal/log",
        "//src/internal/pachctl",
        "//src/internal/pachtmpl",
        "//src/internal/pager",
        "//src/internal/pctx",
        "//src/internal/ppsutil",
        "//src/internal/tabwriter",
        "//src/internal/tracing/extended",
        "//src/internal/uuid",
        "//src/pfs",
        "//src/pps",
        "//src/server/cmd/pachctl/shell",
        "//src/server/pps/pretty",
        "//src/server/transaction/cmds",
        "//src/server/worker/server",
        "//src/worker",
        "@com_github_c_bata_go_prompt//:go-prompt",
        "@com_github_fatih_color//:color",
        "@com_github_fsouza_go_dockerclient//:go-dockerclient",
        "@com_github_itchyny_gojq//:gojq",
        "@com_github_spf13_cobra//:cobra",
        "@org_golang_google_protobuf//encoding/protojson",
        "@org_golang_google_protobuf//types/known/durationpb",
        "@org_golang_google_protobuf//types/known/emptypb",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "cmds_test",
    size = "small",
    srcs = [
        "cmds_realenv_test.go",
        "cmds_simple_test.go",
    ],
    embed = [":cmds"],
    pure = "on",
    shard_count = 4,
    deps = [
        "//src/admin",
        "//src/internal/client",
        "//src/internal/dockertestenv",
        "//src/internal/errors",
        "//src/internal/pachd",
        "//src/internal/pctx",
        "//src/internal/ppsutil",
        "//src/internal/require",
        "//src/internal/testpachd/realenv",
        "//src/internal/testutilpachctl",
        "//src/internal/uuid",
        "//src/pps",
        "@io_k8s_api//core/v1:core",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:meta",
        "@io_k8s_client_go//kubernetes",
        "@org_golang_google_protobuf//encoding/protojson",
    ],
)
